'use client'

import { ChakraProvider as ChakraProviderOrig, extendTheme } from '@chakra-ui/react'
import { CacheProvider } from '@chakra-ui/next-js'

// 定义自定义主题（可以稍后扩展）
const theme = extendTheme({
    colors: {
        brand: {
            50: '#e6f1ff',
            100: '#bdd4f7',
            200: '#94b7ef',
            300: '#6a9ae7',
            400: '#417de0',
            500: '#2763c6',
            600: '#1d4d9b',
            700: '#13376f',
            800: '#092145',
            900: '#000c1c',
        },
    },
    fonts: {
        body: 'var(--font-inter), system-ui, sans-serif',
        heading: 'var(--font-inter), system-ui, sans-serif',
    },
    config: {
        initialColorMode: 'light',
        useSystemColorMode: true,
    },
})

export function ChakraProvider({ children }: { children: React.ReactNode }) {
    return (
        <CacheProvider>
            <ChakraProviderOrig theme={theme}>
                {children}
            </ChakraProviderOrig>
        </CacheProvider>
    )
} 